/**
 * Created by Administrator on 2018/5/26.
 */
var type = {


    add_type:function(){

        $('.new-type-box').removeClass('hide');
        type.set_type('创建众筹',0,'','/www/zc666/images/admin/add-btn.png')
    },

    close_type_box:function()
    {
        $('.new-type-box').addClass('hide');

    },

    edit_type:function(id,name,img)
    {

        $('.new-type-box').removeClass('hide');
        type.set_type('编辑众筹',id,name,img);
    },

    set_type:function(title,id,name,img){

        $('form .title span').text(title);
        $("input[name='typeId']").val(id);
        $("input[name='typeName']").val(name);
        $('#faceimg').attr('src',img);
    },

    show_img:function(fileInfo){

        $('#faceimg').attr('src',fileInfo.data);
    }


}